package com.qkl.xiatang.app.dto.pond;

import com.qkl.xiatang.app.entity.pond.PondEntity;
import lombok.Data;
import org.apache.commons.lang3.ObjectUtils;

import java.util.ArrayList;
import java.util.List;

@Data
public class PondNamesVO {

    private List<String> pondIdList;

    private List<String> pondNameList;

    private List<PondEntity> pondList;


    public void fetchPondIdAndName(){
        if(ObjectUtils.isNotEmpty(pondList)){
            pondIdList = new ArrayList<>();
            pondNameList = new ArrayList<>();
            for (PondEntity entity : pondList){
                pondIdList.add(entity.getId());
                pondNameList.add(entity.getName());
            }
        }
    }


}
